<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="" autocomplete="off">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('School.Type')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select  id="c-rtype" data-rule="required" class="form-control selectpicker" name="row[type]">
                {foreach name="$WeekInfo['TypeList']" item="vo"}
                {if $key <> 1}
                    <option value="{$key}" {in name="key" value="1"}selected{/in}>{$vo}</option>
                {/if}
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('School.Season_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="form-inline" data-toggle="cxselect" data-selects="week_id,season_id,school_id">
                <select id="c-week" data-rule="required" class="week_id form-control selectpicker" name="week_id" data-url="ajax/week?department={$info['department']}">
                </select>
                <select id="c-season" data-rule="required"  class="season_id form-control selectpicker"   name="season_id" data-url="ajax/week?department={$info['department']}" ></select>   
                <select id="c-school" data-rule="required"  class="school_id form-control selectpicker"   name="school_id" data-url="ajax/week?department={$info['department']}" ></select> 
            </div>
       <input type="hidden" name="row[week_id]" id="week_id">
       <input type="hidden" name="row[season_id]" id="season_id">
       <input type="hidden" name="row[school_id]" id="school_id">
        </div>
    </div>
<!--     <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('School.Season_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-season_id" data-rule="required" data-source="/api/base/season" data-params='{"custom[extract_week]":"{$id}"}' class="form-control selectpage form-control" name="row[season_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('School.School_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-school_id" data-rule="required" data-source="/api/base/school" class="form-control selectpage form-control" name="row[school_id]" type="text" value="">
        </div>
    </div>

	<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Data.type 1')}:</label>
        <div class="col-xs-12 col-sm-8">
		   <dl class="fieldlist" data-name="data[type2]" data-template="customtpl">
				<dd>
					<ins>{:__('Data.type 1')}</ins>
					<ins>{:__('Data.proportion')}</ins>
				</dd>
				<dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
				<textarea name="data[type2]" class="form-control hide" cols="30" rows="5"></textarea>
			</dl>
        </div>
    </div> -->
	<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Data.type 2')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:Form::fieldlist('data[type1]',GetBaseInfo('SalesPrice2'), [__('Data.price'),__('Data.num')], '', ['data-rule'=>'required'])}
        </div>
    </div>
	 <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('School.Book_num')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-book_num" data-rule="required" class="form-control form-control" name="row[book_num]" type="number">
        </div>
    </div>
	 <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('School.Book_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-book_price" data-rule="required" class="form-control form-control" name="row[book_price]" type="number" value="{$WeekInfo['BookPrice']}">
        </div>
    </div>
	<!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('School.Reg_level')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select  id="c-reg_level" data-rule="required" class="form-control selectpicker" name="row[reg_level]">
                {foreach name="$WeekInfo['regLevelList']" item="vo"}
                    <option value="{$key}" {in name="key" value="1"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
	<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('School.Level')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select  id="c-level" data-rule="required" class="form-control selectpicker" name="row[level]">
                {foreach name="$WeekInfo['LevelList']" item="vo"}
                    <option value="{$key}" {in name="key" value="1"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
	<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('School.Ranking_level')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select  id="c-ranking_level" data-rule="required" class="form-control selectpicker" name="row[ranking_level]">
                {foreach name="$WeekInfo['rankingLevelList']" item="vo"}
                    <option value="{$key}" {in name="key" value="1"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
	 <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Season.Gift_books')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-gift_books" data-rule="required" class="form-control form-control" name="row[gift_books]" type="number">
        </div>
    </div>
	 <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('School.Coming_num')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-coming_num" data-rule="required" class="form-control form-control" name="row[coming_num]" type="number">
        </div>
    </div>
	 <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('School.People_num')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-people_num" data-rule="required" class="form-control form-control" name="row[people_num]" type="number">
        </div>
    </div> -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Desc')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-desc" class="form-control  form-control" rows="5" name="row[desc]" cols="50"></textarea>
        </div>
    </div>
   
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<script type="text/html" id="customtpl">
    <dd class="form-inline">
		<select class="form-control" name="data[type2][<%=index%>][key]" >
		 {foreach name="$WeekInfo['User']" item="vo"}
			<option value="{$key}" {in name="key" value="<%=row.key%>"}selected{/in} >{$vo['username_text']}</option>
		{/foreach}
		
		</select>
		<input type="text" name="data[type2][<%=index%>][value]" class="form-control type2name" value="<%=row.value%>" size="10"> 
		<span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span> 
		<span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
    </dd>
</script>